package cn.bdqn.study;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Controller
public class DeptConfig {
    @Bean(initMethod = "initAA")
    //@Scope("property")
    //提供方法
    public Dept dept(){
    Dept dept = new Dept();
    dept.initAA();
    dept.setName("研发部");
    return dept;
    }
}
